<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>

<body>





<div class="row">
    <div class="col-md-12">
        <form class="form-horizontal" action="${ctx}/area/insert" method="post" id="editForm">
             <input type="hidden" name="id" id="id" value="${area.id}"/>

            <div class="form-group">
                <label class="col-md-2 control-label">上级区域</label>

                <div class="col-md-8">

                    <c:choose>
                        <c:when test="${ar!=null}">
                            <input  value="${ar.name}" class="form-control input-large" disabled/>
                            <input id="parentId" name="parentId" value="${ar.id}" type="hidden"/>
                        </c:when>
                        <c:otherwise>
                            <input  value="----頂級----" class="form-control input-large" disabled/>
                            <input id="parentId" name="parentId" value="-1" type="hidden"/>
                        </c:otherwise>
                    </c:choose>
                </div>
            </div>


            <div class="form-group">
                <label class="col-md-2 control-label">区域名称</label>

                <div class="col-md-8">
                    <input id="name" name="name" value="${area.name}" placeholder="名称"
                           class="form-control input-large"/>
                </div>
            </div>


            <div class="form-group">
                <label class="col-md-2 control-label">区域编码</label>

                <div class="col-md-8">
                    <input id="code" name="code" value="${area.code}" placeholder="${ar.code==null?"编码":ar.code}"
                           class="form-control input-large"/>
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-2 control-label">状态</label>

                <div class="col-md-8">
                    <input name="status" value="1"  type="radio" <c:if test="${area.status!=0}"> checked="checked" </c:if> class="ace"/>
                    <span class="lbl"> 启用</span>


                    <input name="status" value="0"  type="radio" <c:if test="${area.status==0}"> checked="checked" </c:if> class="ace"/>
                    <span class="lbl"> 锁定</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">区域描述</label>

                <div class="col-md-8">
                     <textarea class="form-control" name="description" id="description" style="width:300px" style="text-align: left">${area.description}</textarea>
                </div>
            </div>


        </form>
    </div>
</div>
<div id="editAlert" class="hide" style="min-width:550px"></div>
</body>
</html>
